<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var number=prompt("您输入的数字是(0~23之间)");
        if(number>=0&&number<=5){
            alert("这是休息时间，不要说话！");
        }else if(number>=6&&number<=12){
            alert("上午好");
        }else if(number>=13&&number<=18){
            alert("下午好");
        }else if(number>=19&&number<=23){
            alert("晚上好");
        }
    </script>
</body>
</html>